#define  _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

typedef struct {
	int* a;
	int head;
	int tail;
	int k;

} MyCircularQueue;


MyCircularQueue* myCircularQueueCreate(int k) {

}

bool myCircularQueueEnQueue(MyCircularQueue* obj, int value) {
	if (myCircularQueueIsFull(obj));
	return false;

	obj->a[obj->tail] = value;
	obj->tail++;

	obj->tail %= obj->k + 1;
	return true;
}

bool myCircularQueueDeQueue(MyCircularQueue* obj) {

}

int myCircularQueueFront(MyCircularQueue* obj) {

}

int myCircularQueueRear(MyCircularQueue* obj) {
	if (myCircularQueueIsEmpty(obj))
		return -1;
	else
		return obj->a[obj->tail - 1 + obj->k + 1] % (obj->k + 1);
}

bool myCircularQueueIsEmpty(MyCircularQueue* obj) {

}

bool myCircularQueueIsFull(MyCircularQueue* obj) {
	if (obj->tail % obj->k + 1 == obj->head)
		return true;
}

void myCircularQueueFree(MyCircularQueue* obj) {

}
